package cn.getech.data.development.constant;

import lombok.Getter;

/**
 * 数据接入的枚举
 *
 * @author hujz
 */
@Getter
public enum DataPush {

    input_input_content(1,"input_input_content", "输入设置的sql语句"),
    output_connect_id(2,"output_connect_id", "输出设置的数据源id"),
    output_connect_type(3,"output_connect_type", "输出设置的数据源"),
    output_pre_statment(4,"output_pre_statment", "输出设置的前置sql"),
//    output_write_model(5,"output_write_model", "输出设置的书写模式");
    output_write_model(5,"output_write_model", "输出设置的书写模式"),
    output_fix_statment(6,"output_fix_statment", "输出设置的后置sql");

    int id;
    String key;
    String value;

    DataPush(int id, String key, String value) {
        id = id;
        this.key = key;
        this.value = value;
    }

    public static DataPush ObjOf(String key) {
        if (key == null) {
            return null;
        } else {
            for (DataPush s : DataPush.values()) {
                if (s.getKey().equalsIgnoreCase(key)) {
                    return s;
                }
            }
            return null;
        }
    }
}
